home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscSoundPalette / MiscVolumeLightInspector.m < prev    next >
Encoding:
Text File  |  1995-04-17  |  1.5 KB  |  65 lines

  1. /*
  2.  
  3. Version 1.2
  4. Copyright (c) 1995 by Sean Luke
  5. Donated to the MiscKit
  6.  
  7. Permission to use, copy, modify, and distribute this material 
  8. for any purpose and without fee, under the restrictions as noted 
  9. in the MiscKit copyright notice, is hereby granted, provided that
  10. the MiscKit copyright notice and this permission notice 
  11. appear in all source copies, and that the author's name shall not
  12. be used in advertising or publicity pertaining to this 
  13. material without the specific, prior written permission 
  14. of the author.  SEAN O. LUKE  MAKES NO REPRESENTATIONS ABOUT THE
  15. ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE.  
  16. IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  17.  
  18. */
  19.  
  20. #import "MiscVolumeLightInspector.h"
  21. #import "MiscSoundUtil.subproj/MiscVolumeLight.h"
  22.  
  23. @implementation MiscVolumeLightInspector
  24.  
  25. - init
  26.     {
  27.     char buf[MAXPATHLEN+1];
  28.     id bundle;
  29.     
  30.     [super init];
  31.     bundle=[NXBundle bundleForClass:[MiscVolumeLight class]];
  32.     [bundle getPath:buf forResource:"MiscVolumeLightInspector" ofType:"nib"];
  33.     [NXApp loadNibFile:buf owner:self withNames:NO fromZone:[self zone]];
  34.     return self;
  35.     }
  36.     
  37.  
  38. - ok:sender
  39.     {
  40.     float r=[refresh floatValue];
  41.     if (r<=0){r=VOLUMEMETER_TIMED_ENTRY_SPEED;[refresh setFloatValue:r];}
  42.     
  43.     if ([track selectedRow]) [object setToInput:self];
  44.     else [object setToOutput:self];
  45.     
  46.     [object setRefresh:r];    
  47.     return [super ok:sender];
  48.     }
  49.     
  50. - revert:sender
  51.     {
  52.     [refresh setFloatValue:[object refresh:self]];
  53.     [track selectCellAt:![object isInput:self]:0];
  54.     
  55.     return [super revert:sender];
  56.     }
  57.     
  58. - (BOOL) wantsButtons
  59.     {
  60.     return NO;
  61.     }
  62.     
  63. @end
  64.  
  65.